import React, { Component } from 'react'

export class CounterButton extends Component {
  render() {
    return (
      <div>
        <button onClick={() => this.increment(1)}>+1</button>
        <button onClick={() => this.subcount(1)}>-1</button>
      </div>
    )
  }
  increment(count) {
    this.props.addClick(count)

  }
  subcount(count) {
    this.props.subClick(count)
  }
}

export default CounterButton
